home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 4 #8 / Commodore_Disk_User_Vol.4_8_1991_-.d64 / primes winner (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  935b  |  27 lines

  1. 0 gosub10:ti$="000000":p%=0:y=0:x=0:dimf%(9999)
  2. 1 forx=0toint(19998^.5-3)/2:iff%(x)thennext:goto4
  3. 2 p%=2*x+3:fory=(p%*p%-3)/2to9999stepp%:f%(y)=1:next
  4. 3 print"[145]",p%,int(ti/.6+.5)/100:next
  5. 4 forx=xto9999:iff%(x)thennext:goto6
  6. 5 print"[145]",2*x+3,int(ti/.6+.5)/100:next
  7. 6 print" [201] look forward to the next challenge!"
  8. 7 poke 53270,200
  9. 8 end
  10. 9 :
  11. 10 print chr$(14)chr$(8)chr$(147):poke 53280,11:poke 53281,12:poke 53270,195
  12. 11 print "[155]   [162][188] [162][188]  [146][187][172]  [162][162][162] [162]  [146][187][172]  [162][162]"
  13. 12 print "   [146][162][172] [146][162][172]      [146][162]       [146][162]"
  14. 13 print "       [146][188][190]     [146][188][190]  "
  15. 14 print "  [162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]"
  16. 15 print tab(8)"[144][212][197][195][200][206][207]-[201][206][198][207] [195][200][193][204][204][197][206][199][197] 1"
  17. 16 print tab(9)"[208]rime number analysis"9 :
  18. 17 print tab(8)"[212]he 228 second solution"
  19. 18 print tab(3)"[208]aul [199]ander" tab(24)"5 [205]arch 1991"
  20. 19 :
  21. 20 print tab(7)"[208]ress any key to commence"
  22. 21 poke 198,0:wait 198,1:poke 198,0
  23. 22 print "[145][145]  [151][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  24. 23 print "  [221] [144][208]rime:       [151][221] [221]        [144]seconds [151][221]"
  25. 24 print "  [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189] [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][145][155]"
  26. 29 return
  27.